<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<s:include value="com-headA0.jsp">
  <s:param name="title"><s:text name="account.title"/></s:param>
</s:include>

<body class="home col-2-right fixed">

  <!-- page -->
  <div id="page">

    <!-- header -->
<s:include value="com-headerB0.jsp">
  <s:param name="headerID">2</s:param>
</s:include>
    <!-- /header -->

    <!-- left+right bottom shadow -->
    <div class="shadow-left page-content main-wrapper">
      <div class="shadow-right">

        <!-- main content: primary + sidebar(s) -->
        <div id="main">
          <div id="main-inside" class="clearfix">

            <!-- primary content -->
            <div id="primary-content">
              <div class="blocks">

<s:form action="account_add" method="post">
  <fieldset>
    <legend><s:text name="account.form.header" /></legend>
    <div class="type-text">
      <label for="account_add_name">
        <s:text name="account.table.column.name"/>
        <sup title="<s:text name='common.label.mandatory'/>"><s:text name="common.label.star"/></sup>
      </label>
      <s:textfield theme="simple" name="name" cssClass="required"/>
    </div>
    
    <div class="type-text">
      <label for="account_add_password">
        <s:text name="account.table.column.password"/>
        <sup title="<s:text name='common.label.mandatory'/>"><s:text name="common.label.star"/></sup>
      </label>
      <s:password theme="simple" name="password" showPassword="true" cssClass="required"/>
    </div>
    
    <div class="type-text">
      <label for="account_add_displayName">
        <s:text name="account.table.column.displayName"/>
        <sup title="<s:text name='common.label.mandatory'/>"><s:text name="common.label.star"/></sup>
      </label>
      <s:textfield theme="simple" name="displayName" cssClass="required"/>
    </div>
    
    <div class="type-text">
      <label for="account_add_email">
        <s:text name="account.table.column.email"/>
        <sup title="<s:text name='common.label.mandatory'/>"><s:text name="common.label.star"/></sup>
      </label>
      <s:textfield theme="simple" name="email" cssClass="required"/>
    </div>
    
    <div class="type-text">
      <label for="account_add_role">
        <s:text name="account.table.column.role"/>
        <sup title="<s:text name='common.label.mandatory'/>"><s:text name="common.label.star"/></sup>
      </label>
      <s:textfield theme="simple" name="role" cssClass="required"/>
    </div>
    
    <div class="type-text">
      <label for="account_add_picPath">
        <s:text name="account.table.column.picPath"/>
        <sup title="<s:text name='common.label.mandatory'/>"><s:text name="common.label.star"/></sup>
      </label>
      <s:textfield theme="simple" name="picPath" cssClass="required"/>
    </div>
  </fieldset>
  
  <div class="type-button">
    <s:submit theme="simple" key="common.button.submit" name="forward"/>
  </div>
</s:form>

<table border="0" cellpadding="0" cellspacing="0" class="full">
	<caption><s:text name="common.table.caption" /></caption>
	<thead>
		<tr>
			<th scope="col" colspan="8"><s:text name="account.table.name" /></th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<th scope="col"><s:text name="common.table.key" /></th>
			<th scope="col"><s:text name="account.table.column.name" /></th>
			<th scope="col"><s:text name="account.table.column.displayName" /></th>
			<!-- <th scope="col"><s:text name="account.table.column.email" /></th> -->
			<th scope="col"><s:text name="account.table.column.role" /></th>
			<th scope="col"><s:text name="account.table.column.picPath" /></th>
			<th scope="col"><s:text name="common.table.edit" /></th>
			<th scope="col"><s:text name="common.table.delete" /></th>
		</tr>
		<s:iterator value="accountList">
			<tr>
                <td><s:property value="key.id" /></td>
				<td><s:property value="name" /></td>
				<td><s:property value="displayName" /></td>
				<!-- <td><s:property value="email" /></td> -->
				<td><s:property value="role" /></td>
				<td><s:property value="picPath" /></td>
				
				<td>
        <s:url id="updateURL" action="account_updateInput">
          <s:param name="accountID"><s:property value="key.id" /></s:param>
        </s:url>
        <s:a href="%{updateURL}"><s:text name="common.table.edit" /></s:a>
				</td>
				
				<td>
        <s:url id="deleteURL" action="account_delete">
	      <s:param name="accountID"><s:property value="key.id" /></s:param>
        </s:url>
        <s:a href="%{deleteURL}"><s:text name="common.table.delete" /></s:a>
				</td>
			</tr>
		</s:iterator>
	</tbody>
</table>

                 </div>
            </div>
            <!-- /primary content -->

            <!-- sidebar -->
            <div id="sidebar">
              <ul class="blocks">

                <!-- search form -->
<s:include value="com-search.jsp" />
                <!-- /search form -->

                <!-- tabbed content -->
<s:include value="com-tabContent.jsp" />
                <!-- /tabbed content -->

                <!-- twitter -->
<s:include value="com-twitter.jsp" />
                <!-- /twitter -->

                <!-- login -->
<s:include value="com-userLogin.jsp" />
                <!-- /login -->

                <!-- links -->
<s:include value="com-links.jsp" />
                <!-- /links -->

              </ul>
            </div>
            <!-- sidebar -->

          </div>
        </div>
        <!-- /main content -->

        <!-- footer -->
<s:include value="com-footer.jsp" />
        <!-- /footer -->

      </div>
    </div>
    <!-- /shadow -->

    <!-- page controls -->
    <div id="pageControls"></div>
    <!-- /page controls -->

  </div>
  <!-- /page -->
</body>
</html>